1. Field of the Invention
This invention relates to and method for operating a computing apparatus including a buffer pool. More specifically, it relates to a data base system providing for management of a buffer pool referenced by both batch and interactive processes.
2. Prior Art
Data base systems which are designed for transaction processing usually have buffer managers which are optimized for random access patterns of buffer usage. Normally, a pool of buffers is managed on a least recently used (LRU) basis, which keeps the data block in the most recently used buffer available for subsequent access by the application which is significantly more likely than access to data blocks in the least recently used buffer. This poses a performance problem for many utilities and some applications which access data in a very sequential manner. An example of such use is a utility for taking a backup copy of a data base: most blocks are retrieved in sequential order. It is desirable, when managing a buffer pool for sequential processes, to provide for data block prefetching by anticipating the need for new blocks from storage and read those into a free buffer. Such is performed by the QSAM buffering technique described in IBM OS/VS2 SAM Logic, Release 3.8, SY26-3832-1, 2nd Edition, QSAM Routines, pp. 15-53, 178-181.
Such prefetching results in a significant problem where pages of data sets assigned to a least recently used (LRU) managed buffer pool are subjected to concurrent random and sequential access patterns. Generally, the demand for sequential access to new pages occurs at a much higher rate than the demand for random access to new pages, particularly when the former entails prefetch. Consequently, the length of time during which a random page can be re-accessed in a buffer without having to be reread from external storage may be reduced to the point where it is inadequate to support the transactions performing random access. This occurs because the rate of movement of a buffer through the LRU chain is a function of buffer reassignment demand rate. A higher demand rate leads to faster movement to the head of the LRU queue, thus shortening the length of time the buffer's old content is available for reaccess.
Buffer monopolization by sequential processes is prevented by allocating to a user (i.e., random or sequential process) a buffer last used by the same user in the IBM IMS/VS Version 1.2 ISAM/OSAM Buffer Handler (source code modules DFSDBH10, DFSDBH20, DFSDBH30 and DFSDBH40--see, in particular, the PSTLR column in the characteristics table in DFSDBH20). However, the ISAM/OSAM Buffer Handler does not provide prefetch capability to enhance the performance of sequential processes.
Thus, in the prior art, buffer pools are either dedicated to batch (sequential) or random processes, or if shared, the batch processes tend to monopolize the pool, requiring unnecessary input/output operations when a random process reaccesses a data set page. Consequently, particularly in data base systems where concurrency exists between random and sequential access to data set pages assigned to a buffer pool, there exists a need for a buffer handler which will manage an LRU buffer pool for both sequential and random processes, yet will prevent unnecessary input/output (I/O) operations for random processes resulting from monopolization of the buffer pool by sequential processes, and at the same time provide such sequential processes with an asynchronous prefetch capability with minimal impact on the performance of random processes.